

import 'package:flutter/cupertino.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:gczn_hd/app/core/values/app_colors.dart';
import 'package:gczn_hd/app/core/values/app_values.dart';

import '../values/text_styles.dart';

class CustomTitleBar extends StatelessWidget{

  final String title;
  final bool isWidget;
  final Color titleColor;
  final Color stickBarColor;
  final Widget? handleBtn;


  const CustomTitleBar({
    Key? key,
    required this.title,
    this.isWidget = true,
    this.titleColor = AppColors.colorWhite,
    this.stickBarColor = AppColors.gcznPrimaryBlueColorBtn,
    this.handleBtn
  });

  @override
  Widget build(BuildContext context) {

    return Container(
      padding: const EdgeInsets.only(top: 0, bottom: 0),
      child: Row(
        children: [
          Expanded(
            flex: 1,
            child: Row(
              children: [
                Container(
                  height: AppValues.size30.h,
                  width: 3,
                  margin: const EdgeInsets.only(right: 12),
                  decoration: BoxDecoration(
                    color: stickBarColor
                  ),
                ),
                Text(title, style: whiteTextStyle.copyWith(fontWeight: FontWeight.w700), maxLines: 1, overflow: TextOverflow.ellipsis,)
              ],
            ),
          ),
          handleBtn??Container()
        ],
      )
    );
  }
}

